# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>

pkgname=gnome-bluetooth-3.0
pkgver=42.7
pkgrel=1
pkgdesc="GNOME Bluetooth Subsystem"
url="https://wiki.gnome.org/Projects/GnomeBluetooth"
arch=(loong64 x86_64)
license=(
  GPL
  LGPL
)
depends=(
  bluez
  gsound
  gtk4
  libadwaita
  libnotify
  pulseaudio-bluetooth
  systemd
  upower
)
makedepends=(
  docbook-xsl
  git
  gobject-introspection
  gtk-doc
  meson
)
checkdepends=(python-dbusmock)
provides=(libgnome-bluetooth{,-ui}-3.0.so)
_commit=38ff31f029f6243394a661f12ac1df7c50b7bff4  # tags/42.7^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-bluetooth.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd gnome-bluetooth
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd gnome-bluetooth
}

build() {
  local meson_options=(
    -D gtk_doc=true
  )

  arch-meson gnome-bluetooth build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
